package com.dome.gateway.config;

import com.dome.gateway.rule.DefaultPropertiesFactory;
import com.dome.gateway.rule.RibbonLoadbalancerRuleConfiguration;
import org.springframework.cloud.netflix.ribbon.PropertiesFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;

/**
 * @description:
 * @author: hz
 * @time: 2021/5/3 15:42
 */
@Configuration
public class GrayConfiguration {

    @Bean
    public LocalValidatorFactoryBean validator() {
        return new LocalValidatorFactoryBean();
    }
    @Bean
    public PropertiesFactory defaultPropertiesFactory() {
        return new DefaultPropertiesFactory();
    }
    @Bean
    public RibbonLoadbalancerRuleConfiguration ribbonLoadbalancerRuleConfiguration() {
        return new RibbonLoadbalancerRuleConfiguration();
    }

}
